/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import "OFX401kInvestmentStatement.h"


@implementation OFX401kInvestmentStatement

@synthesize cashBalance;
@synthesize preTaxSecurityValue;
@synthesize afterTaxSecurityValue;
@synthesize valueOfSecuritiesPurchasedWithMatch;
@synthesize valueOfSecuritiesPurchasedWithProfitSharing;
@synthesize valueOfRollOverSecurities;
@synthesize valueOfSecuritiesPurchasedWithOtherVestingFunds;
@synthesize valueOfSecuritiesPurchasedWithOtherNonVestingFunds;
@synthesize employerName;
@synthesize planId;
@synthesize planJoinDate;
@synthesize employerContactInfo;
@synthesize brokerContactInfo;
@synthesize percentSalaryDeferredBeforeTax;
@synthesize percentSalaryDeferredAfterTax;
@synthesize dollarForDollarMatchPercent;
@synthesize maxMatchAmount;
@synthesize maxMatchPercentOfSalary;
@synthesize startOfYear;
@synthesize baseMatchAmount;
@synthesize baseMatchPercentOfSalary;
@synthesize contributionInfo;
@synthesize currentVestedPercent;
@synthesize vestingInfo;
@synthesize loanInfo;
@synthesize yearToDateSummaryInfo;
@synthesize inceptionToDateSummaryInfo;
@synthesize periodToDateSummaryInfo;
@synthesize totalAmount;

- (id)initWithInvestmentStatement:(OFXInvestmentStatement*)statement
{
  self = [super init];
  
  [self setCurrency:[statement currency]];
  [self setAccount:[statement account]];
  [self setLedgerBalance:[statement ledgerBalance]];
  [self setLedgerBalanceValidAsOf:[statement ledgerBalanceValidAsOf]];
  [self setAvailableBalance:[statement availableBalance]];
  [self setAvailableBalanceValidAsOf:[statement availableBalanceValidAsOf]];
  [self setTransactions:[statement transactions]];
  [self setOtherBalances:[statement otherBalances]];
  [self setDateStart:[statement dateStart]];
  [self setDateEnd:[statement dateEnd]];
  [self setStatementAsOf:[statement statementAsOf]];
  [self setTransactionUID:[statement transactionUID]];
  [self setStatus:[statement status]];
  [self setMarketingInfo:[statement marketingInfo]];
  [self setPositions:[statement positions]];
  [self setMarginBalance:[statement marginBalance]];
  [self setShortBalance:[statement shortBalance]];
  [self setBuyingPower:[statement buyingPower]];
  [self setOpenOrders:[statement openOrders]];
  
  return self;
}

@end
